ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
137 stars 65 forks source link

Could't get error when try to close the closed client #2364

Closed kalaiyarasiganeshalingam closed 2 years ago

kalaiyarasiganeshalingam commented 2 years ago

Description: $Subject

Steps to reproduce:

import ballerinax/mysql;
import ballerinax/mysql.driver as _;

public function main() returns error? {
    mysql:Client dbClient = check new ("localhost", "root", "123", "MYSQL_BBE", 3306);
    check dbClient.close();
    check dbClient.close();
}

Affected Versions: sql 1.0.1-SNAPSHOT

niveathika commented 2 years ago

This is the expected behavior. We clean resources only the first time and the second time this is ignored.