Wrong arity for mochiweb_io:iodevice_stream callback #97

Closed
nikidimi opened this Issue Jan 25, 2013 · 0 comments

2 participants

@nikidimi

CRASH REPORT Process <0.154.0> with 0 neighbours crashed with reason: fun called with wrong arity of 1 instead of 2 in mochiweb_io:'-iodevice_stream/3-fun-0-'/3 line 29

This is caused because Callback is called with arity of 1 here:
iodevice_stream(Callback, IoDevice, BufferSize) ->
F = fun (Data, ok) -> Callback(Data) end,

However, line 309 in mochiweb_request.erl uses send with arity of 2:
mochiweb_io:iodevice_stream(fun send/2, IoDevice)

@etrepum etrepum closed this Jan 26, 2013
@amatas amatas pushed a commit to amatas/erlang-mochiweb-centos that referenced this issue Nov 26, 2015
@lemenkov lemenkov Fixed regression (see mochi/mochiweb#97 )
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
463e0c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment