Menu

#3 Closing of Sockets in high availability

closed-fixed
nobody
None
5
2001-11-02
2001-10-09
No

Patch follows to partially fix bug 469696. When
running in high_availability mode, the Connection
object will explicitly close the previous (and
presumably timed-out) MysqlIO socket before creating a
new MysqlIO object.

Index: Connection.java

============
RCS file: /cvsroot/mmmysql/mm.mysql-
2.0/org/gjt/mm/mysql/Connection.java,v
retrieving revision 1.1
diff -w -r1.1 Connection.java
839a840
> _IO.cleanup();
Index: MysqlIO.java
=======================================================
============
RCS file: /cvsroot/mmmysql/mm.mysql-
2.0/org/gjt/mm/mysql/MysqlIO.java,v
retrieving revision 1.1
diff -w -r1.1 MysqlIO.java
841a842,857
> * Clean-up open sockets
> */
> final void cleanup() {
> try
> {
> _Mysql_Conn.close();
> }
> catch (Exception e)
> {
> if (Driver.trace) {
> Debug.msg
(this, "Unable to cleanup Socket: "+e.getMessage());
> }
> }
> }
>
> /**

Discussion

  • Mark Matthews

    Mark Matthews - 2001-11-02
    • status: open --> closed-fixed
     
  • Mark Matthews

    Mark Matthews - 2001-11-02

    Logged In: YES
    user_id=116907

    I did this a similar way in 2.0.7, as well as cleaning-up
    from finalizers. Please let me know if this works for you.

     

Log in to post a comment.