Opened 14 years ago

Closed 14 years ago

#210 closed patch (fixed)

WriteBlock Function would block indefinitly when bytesToWrite > written

Reported by: mythtv@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords: WriteBlock util.cpp
Cc: Ticket locked: no

Description

I noticed that occasionally the WriteBlock? function would not return. I traced it down to a while loop that executed only when socket->bytesToWrite() >= written.

I changed it to call socket->flush() and reduced the usleep which stopped the lockup in all my testing.

Attachments (1)

util.cpp.diff (335 bytes) - added by MythTv@… 14 years ago.

Download all attachments as: .zip

Change History (2)

Changed 14 years ago by MythTv@…

Attachment: util.cpp.diff added

comment:1 Changed 14 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [7050]) Close #210. Apply a similar patch to fix WriteBlock? from looping..

Note: See TracTickets for help on using tickets.