Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong arity for mochiweb_io:iodevice_stream callback #97

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

Comments

Projects
None yet
2 participants
@nikidimi
Copy link

nikidimi commented Jan 25, 2013

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 added a commit that referenced this issue Jan 26, 2013

@etrepum etrepum closed this Jan 26, 2013

amatas pushed a commit to amatas/erlang-mochiweb-centos that referenced this issue Nov 26, 2015

Fixed regression (see mochi/mochiweb#97 )
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.